<!DOCTYPE html>
<html>
  <head>
  	<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>湛江潜校</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="<c:url value="/bootstrap/css/bootstrap.min.css"/>"/>
    <!-- Font Awesome -->
    <link rel="stylesheet" href="<c:url value="/dist/css/font-awesome.min.css"/>"/>
    <!-- Ionicons -->
    <link rel="stylesheet" href="<c:url value="/dist/css/ionicons.min.css"/>"/>
    <!-- Theme style -->
    <link rel="stylesheet" href="<c:url value="/dist/css/AdminLTE.min.css"/>"/>
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="<c:url value="/dist/css/skins/_all-skins.min.css"/>"/>
    <!-- iCheck -->
    <link rel="stylesheet" href="<c:url value="/plugins/iCheck/flat/blue.css"/>"/>
    <!-- Morris chart -->
    <link rel="stylesheet" href="<c:url value="/plugins/morris/morris.css"/>"/>
    <!-- jvectormap -->
    <link rel="stylesheet" href="<c:url value="/plugins/jvectormap/jquery-jvectormap-1.2.2.css"/>"/>
    <!-- Date Picker -->
    <link rel="stylesheet" href="<c:url value="/plugins/datepicker/datepicker3.css"/>"/>
    <!-- Daterange picker -->
    <link rel="stylesheet" href="<c:url value="/plugins/daterangepicker/daterangepicker-bs3.css"/>"/>
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="<c:url value="/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"/>"/>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="<c:url value="/dist/js/html5shiv.min.js"/>"></script>
        <script src="<c:url value="/dist/js/respond.min.js"/>"></script>
    <![endif]-->
  </head>
  <body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">

      <header class="main-header">
        <!-- Logo -->
        <a href="../index.html" class="logo">
          <!-- mini logo for sidebar mini 50x50 pixels -->
          <span class="logo-mini"><b>ZJ</b>QX</span>
          <!-- logo for regular state and mobile devices -->
          <span class="logo-lg"><b>湛江</b>潜校</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
          <!-- Sidebar toggle button-->
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
          </a>
        </nav>
      </header>
      <!-- Left side column. contains the logo and sidebar -->
      <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
          <section class="sidebar">
          <!-- /.search form -->
          <!-- sidebar menu: : style can be found in sidebar.less -->
          <ul class="sidebar-menu">
            <li class="header">主菜单</li>
			<!-- 药房管理员 -->
			<c:if test="${permission==3}">
			<li class="treeview">
              <a href="#">
                <i class="fa fa-files-o"></i>
                <span>药品管理</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="${ctp }/drugManager/addDrug"><i class="fa fa-circle-o">新建药品</i></a></li>
                <li><a href="${ctp }/drugManager/getDrugList"><i class="fa fa-circle-o">药品列表</i></a></li>
                <li><a href="../medicine/inventoryMedicineNotice.html"><i class="fa fa-circle-o">库存警戒线药品</i></a></li>
                <li><a href="../medicine/expiredMedicine.html"><i class="fa fa-circle-o">药品报损表</i></a></li>
                <li><a href="../medicine/deliverMedicine.html"><i class="fa fa-circle-o">物资发放</i></a></li>
                <li><a href="../medicine/deliverList.html"><i class="fa fa-circle-o">物资发放列表</i></a></li>
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-files-o"></i>
                <span> 缴费管理</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="../pay/registeredList.html"><i class="fa fa-circle-o">挂号</i></a></li>
                <li><a href="../pay/payList.html"><i class="fa fa-circle-o">处方缴费</i></a></li>
                <li><a href="../pay/refundList.html"><i class="fa fa-circle-o">处方退费</i></a></li>
                <li><a href="../pay/registeredStatistics.html"><i class="fa fa-circle-o">挂号统计</i></a></li>
                <li><a href="../pay/paymentStatistics.html"><i class="fa fa-circle-o">缴费统计</i></a></li>
                <li><a href="../pay/refundStatistics.html"><i class="fa fa-circle-o">退费统计</i></a></li>
              </ul>
            </li>
            <li class="treeview">
              <a href="#">
                <i class="fa fa-dashboard"></i> 
                <span>医疗卡管理</span> 
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="${ctp }/drugManager/addPatient"><i class="fa fa-circle-o"></i>新办医疗卡</a></li>
                <li><a href="${ctp }/drugManager/getPatientList"><i class="fa fa-circle-o"></i>医疗卡列表</a></li>
                <li><a href="../card/cardSearch.html"><i class="fa fa-circle-o"></i>医疗卡查询</a></li>
              </ul>
            </li>
			</c:if>
			<!-- 医生 -->
			<c:if test="${permission==2}">
            <li class="treeview">
              <a href="#">
                <i class="fa fa-files-o"></i>
                <span>处方管理</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href=""><i class="fa fa-circle-o"></i>查看处方</a></li>
                <li><a href="${ctp }/doctor/addRecipe"><i class="fa fa-circle-o"></i>添加处方</a></li>
                <li><a href="${ctp }/doctor/getRecipeList"><i class="fa fa-circle-o"></i>处方列表</a></li>
              </ul>
            </li>
			</c:if>
			<!-- 导医 -->
			<c:if test="${permission==4}">
			 <li class="treeview">
              <a href="#">
                <i class="fa fa-files-o"></i>
                <span>绩效统计</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="../finance/personalWorkload.html"><i class="fa fa-circle-o">个人工作量统计</i></a></li>
                <li><a href="../finance/performance.html"><i class="fa fa-circle-o">绩效统计</i></a></li>
              </ul>
            </li>
			<li><a href="../prescription/showPrescription.html"><i class="fa fa-circle-o"></i>查看处方</a></li>
			</c:if>
			
			
            
			<!-- 超级管理员 -->
			<c:if test="${permission==5 }">
			<li class="treeview">
              <a href="#">
                <i class="fa fa-files-o"></i>
                <span> 用户管理</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="${ctp }/superUser/addUser"><i class="fa fa-circle-o">新增用户</i></a></li>
                <li><a href="${ctp }/superUser/getUsers"><i class="fa fa-circle-o">用户列表</i></a></li>
              </ul>
            </li>
            <li class="treeview">
              <a href="#">
                <i class="fa fa-files-o"></i>
                <span> 治疗管理</span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="${ctp }/superUser/addCureList"><i class="fa fa-circle-o">新建治疗项目</i></a></li>
                <li><a href="../project/addPhysicalExamination.html"><i class="fa fa-circle-o">新建体格诊断</i></a></li>
                <li><a href="${ctp }/superUser/getCureList"><i class="fa fa-circle-o">治疗项目列表</i></a></li>
                <li><a href="../project/physicalExaminationList.html"><i class="fa fa-circle-o">体格诊断列表</i></a></li>
              </ul>
            </li>
			</c:if>

          </ul>
        </section>
        <!-- /.sidebar -->
      </aside>

          <!-- 主体部分 START -->

          <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
              <h1>
                新建治疗项目
              </h1>
            </section>

            <section class="content">
              <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                  <li class="active"><a aria-expanded="true" href="#tab_1" data-toggle="tab">未完成处方</a></li>
                  <li><a aria-expanded="false" href="#tab_2" data-toggle="tab">已完成处方</a></li>
                </ul>
                <div class="tab-content"  style="height:600px;">
                  <div class="tab-pane active" id="tab_1" style="height:500px;">
                    <div class="box box-primary">
                      <section class="content">

                        <div class="box">
                          <div class="box-header">
                          <h3 class="box-title">未完成处方列表</h3>
                          </div><!-- /.box-header -->
                          <div class="box-body">
                            <div class="dataTables_wrapper form-inline dt-bootstrap" id="example2_wrapper"><div class="row"><div class="col-sm-6"></div><div class="col-sm-6"></div></div><div class="row"><div class="col-sm-12"><table aria-describedby="example2_info" role="grid" id="example2" class="table table-bordered table-hover dataTable">
                            <thead>
                              <tr role="row">
                                <th colspan="1" row  span="1"  tabindex="0" class="sorting">病人姓名</th>
                                <th colspan="1" rowspan="1"  tabindex="0" class="sorting">性别</th>
                                <th colspan="1" rowspan="1"  tabindex="0" class="sorting">医疗卡卡号</th>
                                <th colspan="1" rowspan="1"  tabindex="0" class="sorting">就诊时间</th>
                                <th colspan="1" rowspan="1" tabindex="0" class="sorting">就诊医生</th>
                                <th colspan="1" rowspan="1"  tabindex="0" class="sorting_desc">操作</th></tr>
                              </thead>
                              <tbody>
                              <c:forEach items="${recipes }" var="recipe">
                              <c:if test="${recipe.isrun==1 }">
								<tr role="row">
                                  <td>${recipe.patientname }</td>
                                  <td>${recipe.patientsex }</td>
                                  <td>${recipe.cardid }</td>
                                  <td><fmt:formatDate value="${recipe.time }" pattern="yyyy年MM月dd日"></fmt:formatDate></td>
                                  <td>${recipe.username }</td>
                                  <td>
                                    <a href="${ctp }/doctor/showRecipeMessage?recipeId=${recipe.recipeid}"><button class="btn btn-primary">查看</button> </a>
                                    <a href="${ctp }/doctor/deleteRecipe?recipeId=${recipe.recipeid}"><button class="btn btn-primary btn-danger">删除</button></a>
                                  </td>
                                </tr>
                                </c:if>
							</c:forEach>
                              </tbody>
                            </table></div></div>

                            <div class="row">
                              <div class="col-sm-7">
                                <div id="example2_paginate" class="dataTables_paginate paging_simple_numbers">
                                  <ul class="pagination">
                                    <li id="example2_previous" class="paginate_button previous disabled"><a tabindex="0" data-dt-idx="0" href="#">Previous</a></li>
                                    <li class="paginate_button active"><a tabindex="0" data-dt-idx="1"  href="#">1</a></li>
                                    <li class="paginate_button "><a tabindex="0" data-dt-idx="2" href="#">2</a></li>
                                    <li class="paginate_button "><a tabindex="0" data-dt-idx="3" href="#">3</a></li>
                                    <li class="paginate_button "><a tabindex="0" data-dt-idx="4" href="#">4</a></li>
                                    <li class="paginate_button "><a tabindex="0" data-dt-idx="5" href="#">5</a></li>
                                    <li class="paginate_button "><a tabindex="0" data-dt-idx="6" href="#">6</a></li>
                                    <li id="example2_next" class="paginate_button next"><a tabindex="0" data-dt-idx="7" href="#">Next</a></li>
                                  </ul>
                                </div>
                              </div>
                            </div>

                          </div>
                        </div><!-- /.box-body -->
                      </div>
                    </section><!-- /.Left col -->
                  </div>   
                </div><!-- /.tab-pane -->
                <div class="tab-pane" id="tab_2"  style="height:500px;">
                  <div class="box box-primary">
                    <section class="content">

                      <div class="box">
                        <div class="box-header">
                          <h3 class="box-title">已完成处方列表</h3>
                        </div><!-- /.box-header -->
                        <div class="box-body">
                          <div class="dataTables_wrapper form-inline dt-bootstrap" id="example2_wrapper"><div class="row"><div class="col-sm-6"></div><div class="col-sm-6"></div></div><div class="row"><div class="col-sm-12"><table aria-describedby="example2_info" role="grid" id="example2" class="table table-bordered table-hover dataTable">
                          <thead>
                            <tr role="row">
                              <th colspan="1" row  span="1"  tabindex="0" class="sorting">病人姓名</th>
                              <th colspan="1" rowspan="1"  tabindex="0" class="sorting">性别</th>
                              <th colspan="1" rowspan="1"  tabindex="0" class="sorting">医疗卡卡号</th>
                              <th colspan="1" rowspan="1"  tabindex="0" class="sorting">就诊时间</th>
                              <th colspan="1" rowspan="1" tabindex="0" class="sorting">就诊医生</th>
                              <th colspan="1" rowspan="1"  tabindex="0" class="sorting_desc">操作</th></tr>
                            </thead>
                            <tbody>

                             <c:forEach items="${recipes }" var="recipe">
                              <c:if test="${recipe.isrun==2 }">
								<tr role="row">
                                  <td>${recipe.patientname }</td>
                                  <td>${recipe.patientsex }</td>
                                  <td>${recipe.cardid }</td>
                                  <td><fmt:formatDate value="${recipe.time }" pattern="yyyy年MM月dd日"></fmt:formatDate></td>
                                  <td>${recipe.username }</td>
                                  <td>
                                    <a href="${ctp }/doctor/showRecipeMessage?recipeId=${recipe.recipeid}"><button class="btn btn-primary">查看</button> </a>
                                    <a href="${ctp }/doctor/deleteRecipe?recipeId=${recipe.recipeid}"><button class="btn btn-primary btn-danger">删除</button></a>
                                  </td>
                                </tr>
                                </c:if>
							</c:forEach>

                            </tbody>
                          </table></div></div>

                          <div class="row">
                            <div class="col-sm-7">
                              <div id="example2_paginate" class="dataTables_paginate paging_simple_numbers">
                                <ul class="pagination">
                                  <li id="example2_previous" class="paginate_button previous disabled"><a tabindex="0" data-dt-idx="0" href="#">Previous</a></li>
                                  <li class="paginate_button active"><a tabindex="0" data-dt-idx="1"  href="#">1</a></li>
                                  <li class="paginate_button "><a tabindex="0" data-dt-idx="2" href="#">2</a></li>
                                  <li class="paginate_button "><a tabindex="0" data-dt-idx="3" href="#">3</a></li>
                                  <li class="paginate_button "><a tabindex="0" data-dt-idx="4" href="#">4</a></li>
                                  <li class="paginate_button "><a tabindex="0" data-dt-idx="5" href="#">5</a></li>
                                  <li class="paginate_button "><a tabindex="0" data-dt-idx="6" href="#">6</a></li>
                                  <li id="example2_next" class="paginate_button next"><a tabindex="0" data-dt-idx="7" href="#">Next</a></li>
                                </ul>
                              </div>
                            </div>
                          </div>

                        </div>
                      </div><!-- /.box-body -->
                    </div>
                  </section><!-- /.Left col -->
                </div>   
              </div><!-- /.tab-pane -->
            </div><!-- /.tab-content -->
          </div>

        </section><!-- /.Left col -->

      </div>

      <!-- 主体部分 END -->



      <footer class="main-footer">
        <div class="pull-right hidden-xs">
          <b>Version</b> 1.0.0
        </div>
        <strong>Copyright &copy; 2015-2015 湛江潜校 .</strong> All rights reserved.
      </footer>

      <!-- Add the sidebar's background. This div must be placed
      immediately after the control sidebar -->
      <div class="control-sidebar-bg"></div>
    </div><!-- ./wrapper -->

    <!-- jQuery 2.1.4 -->
    <script src="<c:url value="/plugins/jQuery/jQuery-2.1.4.min.js"/>"></script>
    <!-- jQuery UI 1.11.4 -->
    <script src="<c:url value="/dist/js/jquery-ui.min.js"/>"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
      $.widget.bridge('uibutton', $.ui.button);
    </script>
    <!-- Bootstrap 3.3.5 -->
    <script src="<c:url value="/bootstrap/js/bootstrap.min.js"/>"></script>
    <!-- Morris.js charts -->
    <script src="<c:url value="/dist/js/raphael-min.js"/>"></script>
    <script src="<c:url value="/plugins/morris/morris.min.js"/>"></script>
    <!-- Sparkline -->
    <script src="<c:url value="/plugins/sparkline/jquery.sparkline.min.js"/>"></script>
    <!-- jvectormap -->
    <script src="<c:url value="/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"/>"></script>
    <script src="<c:url value="/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"/>"></script>
    <!-- jQuery Knob Chart -->
    <script src="<c:url value="/plugins/knob/jquery.knob.js"/>"></script>
    <!-- daterangepicker -->
    <script src="<c:url value="/dist/js/moment.min.js"/>"></script>
    <script src="<c:url value="/plugins/daterangepicker/daterangepicker.js"/>"></script>
    <!-- datepicker -->
    <script src="<c:url value="/plugins/datepicker/bootstrap-datepicker.js"/>"></script>
    <!-- Bootstrap WYSIHTML5 -->
    <script src="<c:url value="/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"/>"></script>
    <!-- Slimscroll -->
    <script src="<c:url value="/plugins/slimScroll/jquery.slimscroll.min.js"/>"></script>
    <!-- FastClick -->
    <script src="<c:url value="/plugins/fastclick/fastclick.min.js"/>"></script>
    <!-- AdminLTE App -->
    <script src="<c:url value="/dist/js/app.min.js"/>"></script>
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
    <script src="<c:url value="/dist/js/pages/dashboard.js"/>"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="<c:url value="/dist/js/demo.js"/>"></script>
  </body>
  </html>
